<session name="userInfo">
 <div class="header"><!-- 头部 begin -->
    <div class="logo"><a href="__ROOT__/" >&nbsp;</a></div>
    <div class="nav_sub br3"  onmouseover="this.className='nav_sub nav_sub_hover br3'" onmouseout="this.className='nav_sub br3'">
      <dl><dt>{$mid|getUserSpace=###,'','','',false}<span class="more"></span></dt>
      	<dd><a href="{:U('home/User/findfriend')}">找人</a></dd>
        <dd><a href="{:U('home/Account')}">设置</a></dd>
        <dd><a href="{:U('home/Account/invite')}">邀请</a></dd>
        <volist name="ts['ucenter']['app']" id="uc_app">
	  	<php> if($uc_app['appid'] == $ts['ucenter']['current_appid'])continue; </php>
	  	<dd><a href="<?php echo $uc_app['url']; ?>" target="_blank"><?php echo $uc_app['name']; ?></a></dd>
	  </volist>
	  <dd><a href="{:U('home/Public/logout')}">退出</a></dd>
      </dl></div>
    <div class="nav">
	  <ul>
	  <li><a href="__ROOT__/" class="fb14">首页</a></li>
	  <li><a href="{:U('enterprise/Index/index')}" class="fb14">企业</a></li>
	  <li><a href="{:U('brands/Index/index')}" class="fb14">品牌</a></li>
	  <li><a href="{:U('products/Index/index')}" class="fb14">产品</a></li>
	  <li><a href="{:U('supplier/Index/index')}" class="fb14">商家</a></li>
	  <li><a href="{:U('wanttobuy/Index/index')}" class="fb14">求购</a></li>

	  </ul>
      <ul>
        <li 
        <php>
        if(APP_NAME == 'home' && MODULE_NAME == 'User' && ACTION_NAME != 'comments' && ACTION_NAME != 'atme')echo 'class="on"';
        </php>
        ><a href="{:U('home')}" class="fb14">我的首页</a></li>
        <li 
        <php>
        if(APP_NAME == 'home' && MODULE_NAME == 'Space' && ACTION_NAME == 'index' && $mid == $uid)echo 'class="on"';
        </php>
        >{$mid|getUserSpace=###, 'fb14', '', '个人主页', false}</li>
        <li 
        <php>
        if( APP_NAME == 'home' && MODULE_NAME == 'Square')echo 'class="on"';
        </php>
        ><a href="{:U('home/Square/index')}" class="fb14">广场</a></li>
        <li id="header_dropdown_app"
        <php> 
        if( APP_NAME != 'home' && APP_NAME != 'group' )echo 'class="on"';
        if( APP_NAME == 'home' && MODULE_NAME == 'Index' && ( ACTION_NAME == 'addapp' || ACTION_NAME == 'editapp') )echo 'class="on"';
		</php> 
		><a href="{:U('home/Index/addapp')}" class="ico_arrow fb14 ">应用</a>
          <div class="dropmenu">
            <dl class="app_list">
                <?php foreach ($ts['user_app'] as $_temp_type => $_temp_apps) { ?>
                <?php foreach ($_temp_apps as $_temp_app) { ?>
                    <dd>
                        <?php if($_temp_type == 'local_app' || $_temp_type == 'local_default_app') { ?>
                        <a href="<?php echo $_temp_app['app_entry'];?>" class="a14">
                            <img class="app_ico" src="<?php echo $_temp_app['icon_url'];?>" />
                            <?php echo $_temp_app['app_alias'];?>
                        </a>
                        <?php }else { ?>
                        <a href="__ROOT__/apps/myop/userapp.php?id=<?php echo $_temp_app['app_id'];?>" class="a14">
                            <img class="app_ico" src="http://appicon.manyou.com/icons/<?php echo $_temp_app['app_id'];?>" />
                            <?php echo $_temp_app['app_alias'];?>
                        </a>
                        <?php }?>
                    </dd>
                <?php } // end of foreach?>
                <?php } // end of foreach?>
                </dl>
                <dl class="app_list">
                <dd style=" border-bottom:0px;">
                    <a href="{:U('home/Index/addapp')}"><span class="app_ico ico_app_add"></span>添加应用</a>
                </dd>
                <dd style=" border-bottom:0px;">
                    <a href="{:U('home/Index/editapp')}"><span class="app_ico ico_manage"></span>管理应用</a>
                </dd>
            </dl>
          </div>
        </li>
        <li id="header_dropdown_message"
        <php>
        if( APP_NAME == 'home' && MODULE_NAME == 'Message' )echo 'class="on"';
        if( APP_NAME == 'home' && MODULE_NAME == 'User' && ( ACTION_NAME == 'atme' || ACTION_NAME == 'comments' ) )echo 'class="on"';
        </php>
        ><a href="{:U('home/message/index')}" class="ico_arrow fb14 ">消息</a>
          <div class="dropmenu"> 
            <a href="{:U('home/message/index')}">
              短消息
              <span class="cRed fB" id="count_message"><gt name="userCount['message']" value="0">({$userCount.message})</gt></span>
            </a> 
			<a href="{:U('home/message/notify')}">
			        系统通知
              <span class="cRed fB" id="count_notify"><gt name="userCount['notify']" value="0">({$userCount.notify})</gt></span>
            </a>
            <a href="{:U('home/message/appmessage')}">
              应用消息
              <span class="cRed fB" id="count_appmessage"><gt name="userCount['appmessage']" value="0">({$userCount.appmessage})</gt></span>
            </a> 
			<a href="{:U('home/user/atme')}">
			        @提到我的
              <span class="cRed fB" id='count_atme'><gt name="userCount['atme']" value="0">({$userCount.atme})</gt></span>
            </a> 
			<a href="{:U('home/user/comments')}">
			        我的评论
              <span class="cRed fB" id='count_comment'><gt name="userCount['comment']" value="0">({$userCount.comment})</gt></span>
            </a>
          </div>
          	<div class="msg_top" id='count_total_div' style='display:<elt name="userCount['total']" value="0">none</elt>'>
          		<a href="" id='count_total'>{$userCount['total']}</a>
          	</div>
          </neq>
        </li>
      </ul>
    </div>
    <form action="{:U('home/user/search')}" id="quick_search_form" method="post">
    <div class="soso br3"><label id="_header_search_label" style="display: block;" onclick="$(this).hide();$('#_header_search_text').focus();">搜名字/标签/微博</label><input type="text" class="so_text" value="" name="k" id="_header_search_text" onblur="if($(this).val()=='') $('#_header_search_label').show();"/><input name="" type="button" onclick="$('#quick_search_form').submit()" class="so_btn hand br3"/></div>
	<script>
	if($('#_header_search_text').val()=='')
		$('#_header_search_label').show();
	else
		$('#_header_search_label').hide();
	</script>
</form>
  </div>
</session>
<nosession name="userInfo">
    <div class="header">
      <div class="logo" style="height:60px;"><a href="__ROOT__/">&nbsp;</a></div>
    <div class="nav">
	  <ul>
	  <li><a href="__ROOT__/" class="fb14">首页</a></li>
	  <li><a href="{:U('enterprise/Index/index')}" class="fb14">企业</a></li>
	  <li><a href="{:U('brands/Index/index')}" class="fb14">品牌</a></li>
	  <li><a href="{:U('products/Index/index')}" class="fb14">产品</a></li>
	  <li><a href="{:U('supplier/Index/index')}" class="fb14">商家</a></li>
	  <li><a href="{:U('wanttobuy/Index/index')}" class="fb14">求购</a></li>
	  </ul>
	</div>
      <div id="indt" class="nav_sub br3">
        <p>
      	<eq name="ts['site']['site_anonymous_square']" value="1">
      	  <a href="{:U('home/Square')}">微博广场</a>&nbsp;|&nbsp;
      	</eq>
      	<a href="{:U('home/Public/register')}">注册</a>&nbsp;|&nbsp;
      	<a href="{:U('home/Public/login')}">登录</a>
        <p>
      </div>
  </div>
</nosession>